package com.ay.smartpark.sdk.common.base;

import com.alibaba.excel.metadata.BaseRowModel;
import com.alibaba.excel.metadata.Table;
import com.ay.smartpark.sdk.common.listener.StyleExcelHandler;


import javax.servlet.http.HttpServletResponse;
import java.util.List;

public class EasyExcelParams {

    /**
     * 表格样式
     */
    private StyleExcelHandler writeHandler;
    /**
     * 表格样式
     */
    private Table table;
    /**
     * 需合并的单元格 list
     */
    private List<int[]> mergeList;
    /**
     * excel文件名（不带拓展名)
     */
    private String excelNameWithoutExt;
    /**
     * 文件名称
     */
    private String fileName;
    /**
     * sheet名称
     */
    private String sheetName;
    /**
     * 是否需要表头
     */
    private boolean needHead = true;
    /**
     * 数据
     */
    private List<? extends BaseRowModel> data;

    /**
     * 数据模型类型
     */
    private Class<? extends BaseRowModel> dataModelClazz;

    /**
     * 无模型数据
     */
    private List<List<Object>> dataList;

    /**
     * 响应
     */
    private HttpServletResponse response;

    public EasyExcelParams() {
    }

    public StyleExcelHandler getWriteHandler() {
        return writeHandler;
    }

    public void setWriteHandler(StyleExcelHandler writeHandler) {
        this.writeHandler = writeHandler;
    }

    public Table getTable() {
        return table;
    }

    public void setTable(Table table) {
        this.table = table;
    }

    public List<int[]> getMergeList() {
        return mergeList;
    }

    public void setMergeList(List<int[]> mergeList) {
        this.mergeList = mergeList;
    }

    public String getExcelNameWithoutExt() {
        return excelNameWithoutExt;
    }

    public void setExcelNameWithoutExt(String excelNameWithoutExt) {
        this.excelNameWithoutExt = excelNameWithoutExt;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getSheetName() {
        return sheetName;
    }

    public void setSheetName(String sheetName) {
        this.sheetName = sheetName;
    }

    public boolean isNeedHead() {
        return needHead;
    }

    public void setNeedHead(boolean needHead) {
        this.needHead = needHead;
    }

    public List<? extends BaseRowModel> getData() {
        return data;
    }

    public void setData(List<? extends BaseRowModel> data) {
        this.data = data;
    }

    public Class<? extends BaseRowModel> getDataModelClazz() {
        return dataModelClazz;
    }

    public void setDataModelClazz(Class<? extends BaseRowModel> dataModelClazz) {
        this.dataModelClazz = dataModelClazz;
    }

    public List<List<Object>> getDataList() {
        return dataList;
    }

    public void setDataList(List<List<Object>> dataList) {
        this.dataList = dataList;
    }

    public HttpServletResponse getResponse() {
        return response;
    }

    public void setResponse(HttpServletResponse response) {
        this.response = response;
    }
}
